
<%@ page import="les.Circulo" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'circulo.label', default: 'Circulo')}" />
        <title>Lista de Circulos</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Inicio</a></span>
            <g:if test="${session.usuarioLogado?.tipo == 'Jota'}">
            	<span class="menuButton"><g:link class="create" action="create">Novo Circulo</g:link></span>
            </g:if>
        </div>
        <div class="body">
            <h1>Circulos</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                        
                            <g:sortableColumn property="nome" title="${message(code: 'circulo.nome.label', default: 'Nome')}" />
                        
                            <g:sortableColumn property="cor" title="${message(code: 'circulo.cor.label', default: 'Cor')}" />
                        
                            <th><g:message code="circulo.encontro.label" default="Encontro" /></th>
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${circuloInstanceList}" status="i" var="circuloInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${circuloInstance.id}">${fieldValue(bean: circuloInstance, field: "nome")}</g:link></td>
                        
                        
                            <td>${fieldValue(bean: circuloInstance, field: "cor")}</td>
                        
                            <td>${fieldValue(bean: circuloInstance, field: "encontro")}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            
            <div class="buttons">
            	<g:if test="${session.usuarioLogado.tipo == 'Jota'}">
	                <g:form controller="indicacao" action="list">
                    	<span class="button"><g:actionSubmit class="list" action="list" value="Indicações" id="Indicações" /></span>
                	</g:form>
                </g:if>
            
            </div>
            
            
        </div>
    </body>
</html>
